# -*- coding: utf-8 -*-
import sys
from PyQt4 import QtCore, QtGui, uic

mavlinkParaDlgui = 'mavlinkParaDlg.ui'
Ui_Dlg, QtBaseClass = uic.loadUiType(mavlinkParaDlgui)

class mavlinkParaDlg(QtGui.QDialog, Ui_Dlg):
    def __init__(self,data):
        QtGui.QDialog.__init__(self)
        Ui_Dlg.__init__(self)
        self.setupUi(self)
        self.initialData(data)
    def initialData(self,data):
        pass
    @staticmethod
    def getPara(parent=None):
        dialog = mavlinkParaDlg(parent)
        result = dialog.exec_()
        # date = dialog.dateTime()
        systemId = dialog.sysyemIdBox.value()
        componentId = dialog.componentIdBox.value()
        return (systemId, componentId, result == QtGui.QDialog.Accepted)

if __name__ == "__main__":  
    app = QtGui.QApplication(sys.argv)
    window = mavlinkParaDlg()
    window.show()
    sys.exit(app.exec_())